<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>List don giản</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.corner.js"></script>

<script> 
$(document).ready(function()
 { 
 $("#rowsp #sp").corner ("8px");
 //$("#sp").corner("dog2 30px");
}); 
</script>
<link href="jsjquery/tooltips.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php
$idhang = $_GET["idhang"];
include("kn.php");
/*$lenh = "select hinh,tenlaptop,tenhanglaptop,tenloai,concat(soluong,' Cái') as soluong,concat(format(dongia,0),' VNĐ') as dongia,malaptop from laptop,hanglaptop,loailaptop where laptop.mahanglaptop = hanglaptop.mahanglaptop and laptop.maloailaptop = loailaptop.maloailaptop and laptop.mahanglaptop='$idhang'";*/
$lenh = "select hinh,tenlaptop,tenhanglaptop,tenloai,concat(soluong,' Cái') as soluong,concat(format(dongia,0),' VNĐ') as dongia,malaptop,ngaynhap,laptop.Mota from laptop,hanglaptop,loailaptop where laptop.mahanglaptop = hanglaptop.mahanglaptop and laptop.maloailaptop = loailaptop.maloailaptop and laptop.mahanglaptop='$idhang'";
$kq = mysql_query($lenh);
$sodulieu = mysql_num_rows($kq);
$sodong = 6;
$sotrang = ceil($sodulieu/$sodong);
if(!$_GET["p"])
$p = 1;
else
$p = $_GET["p"];
$x = ($p - 1)*$sodong;
/*$lenh1 = "select hinh,tenlaptop,tenhanglaptop,tenloai,concat(soluong,' Cái') as soluong,concat(format(dongia,0),' VNĐ') as dongia,malaptop from laptop,hanglaptop,loailaptop where laptop.mahanglaptop = hanglaptop.mahanglaptop and laptop.maloailaptop = loailaptop.maloailaptop and laptop.mahanglaptop='$idhang' limit $x,$sodong";*/
$lenh1 = "select hinh,tenlaptop,tenhanglaptop,tenloai,concat(soluong,' Cái') as soluong,concat(format(dongia,0),' VNĐ') as dongia,malaptop,ngaynhap,laptop.Mota from laptop,hanglaptop,loailaptop where laptop.mahanglaptop = hanglaptop.mahanglaptop and laptop.maloailaptop = loailaptop.maloailaptop and laptop.mahanglaptop='$idhang' limit $x,$sodong";
$kq1 = mysql_query($lenh1);

?>

<div id="rowsp">
<div id="dhtmltooltip"></div>
<script type="text/javascript" src="jsjquery/tooltips.js"></script> 

<?php
	while($row = mysql_fetch_row($kq1))
	{
?>
  <div id="sp">
   <a onmouseout="hideddrivetip()" onmouseover="ddrivetip('<?php  echo $row[6];  ?>', 'lightyellow', 500)" href="#" > 	<?php echo $row[1];?></a>
  <br />
<span style="display:none" id="select_text_<?php  echo $row[6];  ?>"><? echo  $row[8];?></span>
<span style="display:none" id="select_image_<?php  echo $row[6];  ?>"><? echo  $row[0];?></span> 	

        
        
        
        <?php
		echo $row[2];
		?>
        <br />
        <?php
		echo $row[3];
		?>
        <br />
        <?php
		echo $row[4];
		?>
        <br />
        <?php
		echo $row[5];
		?>
        <br />
        <img src="laptop/<?php
		echo $row[0];
		?>" width="100" height="100" />
        <br />
        
      <a href="index.php?idlaptop=<?php  echo $row[6];   ?>"> Chi tiết </a><br />
  <a href='index.php?Malaptop=<?php echo $row[6]?>&act=gh'><img src='image/dathang.gif' width='85' height='17' vspace="5" border = '0'/></a></div>
  	 	<?php
	
	}
	
		?>	



<br />



</div>
<div class="phantrang">
<?php
for($i = 1; $i <= $sotrang; $i++)
{
	if($i == $p)
	{
		echo $i."&nbsp;";
	}
	else
	{
	?>
	<a href="index.php?idhang=<?php echo $idhang;   ?>&p=<?php echo $i;    ?>"><?php echo $i;    ?></a>
	<?php
	}
}


?>
</div>

</body>
</html>
